<?  
            $p=$this->profile;
//            var_dump($p);die;
            $messages=$this->messages;
//            var_dump($messages);die;
            $friends=$this->friends;
//           $vCon=$this->venueController;
?>
<div style="width: 650px; top:500px; clear: both;" class="body" id="main">
	<div id="content">
		<article class="round_edge_10px block" id="main_post_box">
                 <p>What you want to say?</p>
                <textarea id="publish_editor" rows="" cols="" name="" accesskey="1" tabindex="1" 
                          style="width:400px; font-family: Tahoma,宋体; border-style: solid; border-width:
                          1px; word-wrap: break-word; font-size: 14px; line-height: 18px; overflow-x: hidden;"
                          range="0&amp;0"></textarea>
                <button id="main_post_btn" onclick="try{ main_post_submit(); } catch (e) {alert(e);}">Post</button>
                <p>Where are you? <input type="text" id="location_ac" class><button>Select</button></p>
                <div id="location_selecter"></div>
		</article>
<? if ($messages!=null && sizeof($messages)>0){
    for($i=0;$i<sizeof($messages);$i++){
        $m=$messages[$i];
//        var_dump($m);die;
        ?>
        <article class="round_edge_10px block">
                    <input type="hidden" class="id_field1" value="<?=$m->getUser_id();?>"/>
                    <span class="post_time"><?=$m->getPublic_time(); ?></span>&nbsp;
                    <a href="" class="m_poster"><?=$p->getName();?></a> said:
                <p class="m_post"><?=$m->getMessage_content();?></p>
                <p class="m_op">
                    <a class="m_venue_element"
                                  href="/venue?vid=<?=$m->getVenue_id();?>">
                        <?=$m->getVenue_name();?>
                    </a>
                    <a class="m_op_element" href="">Reply</a>
                </p>
          </article>
        <?
    }
}
else{
     ?> <article class="round_edge_10px block">
                  There is no messages.
      </article>
<?}
?>

	</div>
	<div id="sidebar">
	<aside id="description" class="round_edge_10px block">
                   <section>
                    <figure id="user_fig" class="">
                        <img width="100px" src=""/>
                        <div style="margin:2px; float:right; position: relative; left:-20px;">
                            <a href="" style="" id="user_name"><?=$p->name;?></a><br/>
                            <a id="user_college" style="font-size:70%; word-wrap:word-break;overflow:hidden;"><?=$p->getUniversity(); ?></a>
                        </div>
                    </figure>
                    <p id="user_desc" style="float:none;">
                   <?=$p->address; ?>
                    </p>
                   </section>
	</aside>
        <aside id="featured1" name="bulletin" class="round_edge_10px block featured">
		<h4>Bulletin</h4>
                <?if (true){
                    echo "This is the day!";
                }?>
  	</aside>
        <aside id="featured3" name="friends" class="round_edge_10px block featured">
	<!--showing the recommendations-->
		<h4>Friends</h4>
                <?
                    for($i=0;$i<sizeof($friends);$i++){
                        $friend=$friends[$i];
                        ?>
                        <div class="friend_element">
                           <?= $friend->getTarget_name();?>
                        </div>
                        <?
                    }
                ?>
  	</aside>
	<!--end of featured recommendation-->
	</div>
        </div>
            
